//
//  UIView+MLXCross.m
//  MLX
//
//  Created by SY on 2018/9/25.
//  Copyright © 2018年 SY. All rights reserved.
//

#import "UIView+MLXCross.h"

@implementation UIView (MLXCross)
- (BOOL)intersectWithView:(UIView *)view{
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    CGRect selfRect = [self convertRect:self.bounds toView:window];
    CGRect viewRect = [view convertRect:view.bounds toView:window];
    return CGRectIntersectsRect(selfRect, viewRect);
}
@end
